import { defineStore } from "pinia";

const useCounterStore = defineStore('counter', {
  state: () => ({
    count: 100
  }),
  getters: {
    doubleCounter(state) {
      return state.count * 2
    }
  },
  actions: {
    changeCounterAction(newCounter) {
      console.log(newCounter, '---')
      this.count = newCounter
    },
  }
})
export default useCounterStore  